1 using Assets.Scripts.Network;
2 using
UnityEngine;
3
4 namespace
Assets.Scripts
5 {
6     
public class CoreBehaviour : MonoBehaviour
7     {
8         
public new GameObject gameObject { get; private set; }
9
10         
public new Transform transform { get; private set; }
11
12         
protected IGameService GameService { get; private set; }
13
14         
protected INetworkService NetworkService { get; private set; }
15         
16         
protected virtual void Awake()
17         {
18             gameObject =
base.gameObject;
19             transform =
base.transform;
20         }
21
22         
protected virtual void Start()
23         {
24             GameService = ServiceLocator.GetService<IGameService>();
25             NetworkService = ServiceLocator.GetService<INetworkService>();
26         }
27
28         
protected virtual void Update()
29         {
30         }
31
32         
protected virtual void OnDestroy()
33         {
34         }
35     }
36 }



Trò chơi Tic-Tac-Toe, game đánh caro full source code 53.592 lượt xem

Gõ tìm kiếm nhanh...